#ifndef PFMIMAGE_H
#define PFMIMAGE_H
#include <QString>
#include <QVector3D>
class PFMImage
{
public:
    PFMImage();
    ~PFMImage();
    PFMImage(short width, short height, short channels, float* buffer=0);

    void CreatePixelBuffer(short width, short height, short channels, float* buffer=0);

    short GetWidth()
    {
        return w;
    }
    short GetHeight()
    {
        return h;
    }
    short GetChannels()
    {
        return c;
    }
    QVector3D GetPixelValue(short u, short v);
    void SetPixelValue(short u, short v, QVector3D color);
    void WriteToFile(QString filename);
    void ReadFromFile(QString filename);

private:
    short w;
    short h;
    short c;//channels
    float* pixelBuffer;

};

#endif // PFMIMAGE_H
